package com.moshang.blog.service;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.service.IService;
import com.moshang.blog.entity.TbSort;
import com.moshang.blog.core.utils.ZtreeUtil;

import java.util.List;
import java.util.Map;

/**
 * @program: blog
 * @description: ${description}
 * @author: xieweiwei
 * @create: 2018-11-16 09:41
 **/
public interface TbSortService extends IService<TbSort> {
    List<TbSort> selectAllSorts(Map<String, Object> map);

    int getCountByName(String name);

    void saveOrUpdateSort(TbSort tbSort,String type);

    List<TbSort> selectByParent(Integer id);

    List<ZtreeUtil> selectZtreeData();

    JSONArray getTreeUtil(Object o);
    List<TbSort> getSortByParent(Integer parentId);

    List<TbSort> getSorts();
}
